<template>
	<view class="swiper_box">
		<!-- :style="style_item" -->
		<swiper class="swiper"  :autoplay="true" :interval="2000" :duration="500">
			<swiper-item @click="navTo(item.link)" class="swiper_item" v-for="(item,index) in list" :key="index">
				<!-- <image :src="item.file" style="width: 100%; height: 680rpx;" mode="aspectFit"></image> -->
				<u-image width="100%" border-radius="25" :height="style_item.height" :src="item.file"
					mode="aspectFit"></u-image>
			</swiper-item>
		</swiper>
	</view>
</template>

<script>
	export default {
		props: {
			// 缺省图
			list: {
				type: Array,
				default: []
			},
			style_item: {
				type: Object,
				default: () => ({})
			},
		},
		data() {
			return {

			}
		},
		mounted() {
		},
		methods: {
			navTo(url) {
				uni.navigateTo({
					url: url
				})
			}
		}
	}
</script>

<style scoped>
	.swiper_box {
		padding: 0 30rpx;
		
	}

	.swiper {
		
		box-sizing: border-box;
	}

	.swiper_item {
		display: flex;
		align-items: center;
		justify-content: center;
		box-sizing: border-box;
		border-radius: 15rpx;
		/* width: 710rpx; */
		/* height: 300rpx; */
	}
</style>